export interface EnumBaseValue {
  label: string
  value: string
}

export interface EnumDataType extends EnumBaseValue {
  fieldOptions: EnumBaseValue[]
}

export enum PageLinkDir {
  ADD = '添加',
  EDIT = '编辑',
  LOOK = '查看'
}

export class DataType {
  public static MYSQL: EnumDataType = {
    label: 'mysql',
    value: 'mysql',
    fieldOptions: [
      {
        label: 'TINYINT',
        value: 'TINYINT'
      },
      {
        label: 'SMALLINT',
        value: 'SMALLINT'
      },
      {
        label: 'MEDIUMINT',
        value: 'MEDIUMINT'
      },
      {
        label: 'INT',
        value: 'INT'
      },
      {
        label: 'BIGINT',
        value: 'BIGINT'
      },
      {
        label: 'FLOAT',
        value: 'FLOAT'
      },
      {
        label: 'DOUBLE',
        value: 'DOUBLE'
      },
      {
        label: 'CHAR',
        value: 'CHAR'
      },
      {
        label: 'VARCHAR',
        value: 'VARCHAR'
      },
      {
        label: 'TINYBLOB',
        value: 'TINYBLOB'
      },
      {
        label: 'TINYTEXT',
        value: 'TINYTEXT'
      },
      {
        label: 'BLOB',
        value: 'BLOB'
      },
      {
        label: 'TEXT',
        value: 'TEXT'
      },
      {
        label: 'MEDIUMBLOB',
        value: 'MEDIUMBLOB'
      },
      {
        label: 'MEDIUMTEXT',
        value: 'MEDIUMTEXT'
      },
      {
        label: 'LONGBLOB',
        value: 'LONGBLOB'
      },
      {
        label: 'LONGTEXT',
        value: 'LONGTEXT'
      },
      {
        label: 'DATE',
        value: 'DATE'
      },
      {
        label: 'TIME',
        value: 'TIME'
      },
      {
        label: 'YEAR',
        value: 'YEAR'
      },
      {
        label: 'DATETIME',
        value: 'DATETIME'
      },
      {
        label: 'TIMESTAMP',
        value: 'TIMESTAMP'
      },
      {
        label: 'TINYBLOB',
        value: 'TINYBLOB'
      },
      {
        label: 'BLOB',
        value: 'BLOB'
      },
      {
        label: 'MEDIUMBLOB',
        value: 'MEDIUMBLOB'
      },
      {
        label: 'LONGBLOB',
        value: 'LONGBLOB'
      }
    ]
  }

  public static ORACLE: EnumDataType = {
    label: 'oracle',
    value: 'oracle',
    fieldOptions: [
      {
        label: 'CHAR',
        value: 'CHAR'
      },
      {
        label: 'VARCHAR2',
        value: 'VARCHAR2'
      },
      {
        label: 'NCHAR',
        value: 'NCHAR'
      },
      {
        label: 'NVARCHAR2',
        value: 'NVARCHAR2'
      },
      {
        label: 'DATE',
        value: 'DATE'
      },
      {
        label: 'TIMESTAMP',
        value: 'TIMESTAMP'
      },
      {
        label: 'LONG',
        value: 'LONG'
      },
      {
        label: 'RAW',
        value: 'RAW'
      },
      {
        label: 'LONG',
        value: 'LONG'
      },
      {
        label: 'BLOB',
        value: 'BLOB'
      },
      {
        label: 'CLOB',
        value: 'CLOB'
      },
      {
        label: 'NCLOB',
        value: 'NCLOB'
      },
      {
        label: 'BFILE',
        value: 'BFILE'
      },
      {
        label: 'ROWID',
        value: 'ROWID'
      },
      {
        label: 'NROWID',
        value: 'NROWID'
      },
      {
        label: 'NUMBER',
        value: 'NUMBER'
      },
      {
        label: 'DECIMAL',
        value: 'DECIMAL'
      },
      {
        label: 'INTEGER',
        value: 'INTEGER'
      },
      {
        label: 'FLOAT',
        value: 'FLOAT'
      },
      {
        label: 'REAL',
        value: 'REAL'
      }
    ]
  }
}

export class MessageTypeEnum {
  public static DATA_TYPE = {
    type: 'dataTypeMessage',
    name: '数据库类型'
  }
}
